import { useCounterStore } from '../../store/count'
// 来自store
const Counter = () => {
    const { 
        count,
        increment,
        decrement
    } = useCounterStore()

    return (
        <div>
            <h1>Counter</h1>
            <p>Current count: {count}</p>
            <button onClick={increment}>Increment</button>
            <button onClick={decrement}>Decrement</button>
        </div>
    )
}

export default Counter